package com.maoguo.user.controller;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Component;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

@Component
@Path("/login")
public class LoginController {
    @GET
    public  String login(){
        System.out.println("----login5435333333佛挡杀佛");
        Subject subject = SecurityUtils.getSubject();
        UsernamePasswordToken token = new UsernamePasswordToken("lixiaolin", "123456");
        subject.login(token);
        return "login";
    }
}
